<div class="am-u-sm-12 widget" style="margin:10px ;">
	<form class="am-form-inline tpl-form-border-form" action="" method="get">
		<div class="am-u-sm-12 cl-p">
			<div class="am-u-sm-8 cl-p">
				<div class="am-u-sm-6">
					<input type="text" class="am-form-field tpl-form-no-bg" name="name" placeholder="公司名称" value="{$Think.get.name}">
				</div>
				<div class="am-u-sm-6">
					<button type="submit" class="am-btn am-btn-secondary am-radius am-btn-sm">查询</button>
					{if $op == 'search'}
						{else/}
					<a href="{:url('add')}" class="am-btn am-btn-secondary am-radius am-btn-sm">添加租车公司</a>
					{/if}
				</div>
			</div>
		</div>
		<div class="am-u-sm-12 cl-p">
			<div><button style="float: right;" type="button" class="am-btn am-btn-default am-radius am-btn-xs" style="margin-top: -2px;">导出文件</button></div>
			<table width="100%" class="am-table am-table-compact am-text-nowrap tpl-table-black ">
				<thead>
					<tr>
						{if $op == 'search'}
						<th>操作</th>
						{else/} 
						<td><input type="checkbox" /></td>
						{/if}
						<th>公司名称</th>
						{if $op == 'search'}
						{else/}
						<th>司机</th>
						<th>车辆</th>
						{/if}
						<th>联系人</th>
						<th>电话</th>
						<th>状态</th>
						{if $op == 'search'}
						{else/}
						<th>操作</th>
						{/if}
					</tr>
				</thead>
				<tbody>
					{foreach $list as $key => $item}
					<tr class="gradeX" data-id="{$item.car_rental_id}">
						{if $op == 'search'}
						<th>
							<div class="tpl-table-black-operation">
								<a href="javascript:;" class="choose" data-id="{$item.car_rental_id}" data-name="{$item.name}">
								<i class="am-icon-pencil"></i> 选中
							</a>
							</div>
						</th>
						{else/} 
						<td><input type="checkbox" /></td>
						{/if}
						<td>
							{$item.name}
						</td>
						{if $op == 'search'}
						{else/}
						<td data-id="{$item.car_rental_id}">
							<div class="tpl-table-black-operation">
								<a class="driver">
									<i class="am-icon-pencil"></i> 查看
								</a>
							</div>
						</td>
						<td data-id="{$item.car_rental_id}">
							<div class="tpl-table-black-operation">
								<a class="car">
									<i class="am-icon-pencil"></i> 查看
								</a>
							</div>
						</td>
						{/if}
						<td>{$item.contacts}</td>
						<td>{$item.phone}</td>
						<td class="am-text-{$item.state==9?'danger':'success'}">{$item.state==9?'已禁用':'已启用'}</td>
						{if $op == 'search'}
						{else/}
						<td data-id="{$item.car_rental_id}">
							<div class="tpl-table-black-operation">
								{if $item.state == 9}
								<a href="javascript:;" class="startusing" data-method="startusing">
									<i class="am-icon-pencil"></i> 启用
								</a>
								{else/}
								<a href="javascript:;" class="tpl-table-black-operation-del forbidden" data-method="forbidden">
									<i class="am-icon-trash"></i> 禁用
								</a>
								{/if}

								<a href="{:url('edit',['car_rental_id'=>$item.car_rental_id])}">
									<i class="am-icon-pencil"></i> 编辑
								</a>
								<a href="javascript:;" class="tpl-table-black-operation-del delete-list" data-method="delete">
									<i class="am-icon-pencil"></i> 删除
								</a>

								<a href="{:url('edit',['car_use_id'=>$item.car_use_id])}">
									<i class="am-icon-pencil"></i> 重置
								</a>
							</div>
						</td>
						{/if}
					</tr>
					{/foreach}
					<!-- more data -->
				</tbody>

			</table>
			{if $op == 'search'}
						{else/}
			<div><button style="float: left;" type="button" class="am-btn am-btn-primary am-radius am-btn-xs" style="margin-top: -2px;">短信发送</button></div>
			{/if}
			<div class="am-u-lg-12 am-cf">

				<div class="am-fr">
					{$pager}
				</div>
			</div>
		</div>
	</form>
</div>